/**   
* The class ErrorToken extends the class CalcToken and represents an invalid token
* This means that all tokens that are not numbers, arethmetic operations or brackets are Error Tokens.
* @author Michael Fildstein, ID: 309161594        
* @author Tomer Ben Rachel ID: 021982475        
*/  



public class ErrorToken extends CalcToken {

	private String error;
	

/**   
* Copy Contructor that creates a new ErrorToken using a String data type   
* @param text A String data type representing the token that is to be considered an error   
*/  

public ErrorToken(String text){
		this.error = text;
	}
	
   
/**   
* The method toString returns a string representing the ErrorToken we got   
* @return A string data type representing the ErrorToken with the message informing the user that we have encountered 
* an ErrorToken.   
*/   

	public String toString(){
		return "SYNTAX ERROR: " + error;
	}
}
